#include "GlobalHeader.h"


int main()
{
    pid_t pid = fork();
    if(pid < 0)
        return -1;
    if(pid == 0)
    {
        while(1)
        {
            printf("我是一个子进程!\n");
            sleep(1);
        }
    }
    else
    {
        sleep(5);
        //给指定的进程发信号
        kill(pid,SIGINT);
        wait(NULL);
    }
    
    
    return 0;
}